<%@ page language="java" import="java.util.*,com.fescoservice.model.*" pageEncoding="UTF-8"%>

<%
	String langfilename = "/resources/message";
	Company comp =(Company) request.getAttribute("Company");
	String compNameSel =  request.getAttribute("compNameSel")==null?"":(String)request.getAttribute("compNameSel");
	
%>
<%@include file="../common/LocaleManager.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>Fesco Service</title>
		<link rel="stylesheet" href="<%=path%>/js/jquery/themes/redmond/jquery.ui.all.css">
		<script src="<%=path%>/js/jquery/jquery-1.5.1.js"></script>
		<script src="<%=path%>/js/jquery/external/jquery.bgiframe-2.1.2.js"></script>
		<script src="<%=path%>/js/jquery/ui/jquery.ui.core.js"></script>
		<script src="<%=path%>/js/jquery/ui/jquery.ui.widget.js"></script>
		<script src="<%=path%>/js/jquery/ui/jquery.ui.mouse.js"></script>
		<script src="<%=path%>/js/jquery/ui/jquery.ui.button.js"></script>
		<script src="<%=path%>/js/jquery/ui/jquery.ui.draggable.js"></script>
		<script src="<%=path%>/js/jquery/ui/jquery.ui.position.js"></script>
		<script src="<%=path%>/js/jquery/ui/jquery.ui.resizable.js"></script>
		<script src="<%=path%>/js/jquery/ui/jquery.ui.dialog.js"></script>
		<script src="<%=path%>/js/jquery/ui/jquery.ui.datepicker.js"></script>	
		<script src="<%=path%>/js/jquery/ui/jquery.effects.core.js"></script>
		<link rel="stylesheet" href="<%=path%>/css/admin.css">
	
		<style type="text/css">
		
		</style>
		<script type="text/javascript">
			$(function() {
				$("#btnAdd").button().click(function() {
					document.forms.mainForm.action = '<%=path%>/action/Company.htm?cmd=modifyCompany';
					document.forms.mainForm.submit();		
				});
				$("#btnBack").button().click(function() {
					document.forms.mainForm.action = '<%=path%>/action/Company.htm?cmd=list';
					//document.forms.mainForm.type.value=""
					document.forms.mainForm.submit();		
				});
				$('#operCompany').hide();
				$('#operRole option').each(function(){ 
					if(this.value>2) {
						$(this).hide(); 
					}else{
						$(this).show(); 
					}
				}); 
			});
			function checkId(value){
				ManageAjaxController.checkId(value,
						{callback:function(dataFromServer){
								if("true"=dataFromServer){
									$("#IdRepeatTips").style.display="inline";
								}else{
									$("#IdRepeatTips").style.display="none";
								}
							} 
						}); 	
			}
			function changeType(value){
				if("0"==value){
					$('#operCompany').hide();
					$('#operDept').show();
					$('#operRole option').each(function(){ 
						if(this.value>2) {
							$(this).hide(); 
						}else{
							$(this).show(); 
						}
					}); 
				}else{
					$('#operCompany').show();
					$('#operDept').hide();
					$('#operRole option').each(function(){ 
						if(this.value>2) {
							$(this).show(); 
						}else{
							$(this).hide(); 
						}
					}); 
				}
			}
		</script>
	</head>
	<body>
		
		<div class="wrapContent">	
			<div class="ui-widget">	
				<div class="ui-widget-header">
					<%=resource.getString("FS_T_VIEW")%><%=resource.getString("FS_T_COMPANY")%>
				</div>
				<div class="ui-widget-content operatorForm">
					<form name="mainForm" method="post">
					<table>
						<tr><td width="15%">
							<label for="compName">
								<%=resource.getString("FS_T_COMP_NAME")%>
							</label>
							</td>
							<td width="35%">
							<input type="hidden" name="compNameSel" class=" ui-corner-all" value="<%=compNameSel %>" />	
							<input type="hidden" name="compId" class=" ui-corner-all" value="<%=comp.getCompId() %>" />		
							<%=comp.getCompName() %>				
						</td>
						<td width="15%">
							<label for="compAddr">
								<%=resource.getString("FS_T_COMP_ADDR")%>
							</label>
							</td>
							<td width="35%">
							<%=comp.getCompAddr() %>
							
						</td></tr>
						<tr><td width="15%">
						
							<label for="compManager">
								<%=resource.getString("FS_T_COMP_MANAGER")%>
							</label></td><td width="35%">
							<%=comp.getCompManager() %>
							
						</td><td width="15%">

							<label for="compType">
								<%=resource.getString("FS_T_COMP_TYPE")%>
							</label></td>
							<td width="35%">
							<%=comp.getCompType()%>
							
						</td></tr>
						
						<tr><td width="15%">
						
	
							<label for="compContact">
								<%=resource.getString("FS_T_COMP_CONTACT")%>
							</label></td><td width="35%">
							<%=comp.getCompContact()%>
							
						</td><td width="15%">
							<label for="compContactTel">
								<%=resource.getString("FS_T_COMP_CONTACT_TEL")%>
							</label></td><td width="35%">
							<%=comp.getCompContactTel()%>
							
						</td></tr>
						<tr><td width="15%">
	
							<label for="compZipcode">
								<%=resource.getString("FS_T_COMP_ZIPCODE")%>
							</label></td><td  colspan = "3">
							<%=comp.getCompZipcode()%>
							
						</td></tr>
						</table>
					</form>
				</div>
			
				<div class="buttonGroupRight">
			   		
					<div id="btnBack" ><%=resource.getString("FS_T_LIST")%></div>
				</div>	
			
			</div>
		</div>
		<script type="text/javascript"	>	
		//import scripts below to pages which display in right frame, for ajust the scroll height
		parent.scroll(0,0);
		parent.setFrameHeight(document.body.scrollHeight+200);
		</script>
	</body>
</html>